﻿using System;

namespace FNN.Genetic.Mutations
{
    public abstract class Mutation
    {
        protected Random MutationRandomizer = new Random();

        protected DnaHelix TargetDnaValue;
        protected MutationTargets MutationTargetValue;
        protected MutationTypes MutationTypeValue;

        /// <summary>
        ///     Целевая цепочка
        /// </summary>
        public DnaHelix TargetDna
        {
            get { return TargetDnaValue; }
            set { TargetDnaValue = value; }
        }

        public MutationTypes MutationType
        {
            get { return MutationTypeValue; }
            set { MutationTypeValue = value; }
        }

        public MutationTargets MutationTarget
        {
            get { return MutationTargetValue; }
            set { MutationTargetValue = value; }
        }

        /// <summary>
        /// Выполнить мутацию
        /// </summary>
        public abstract void Execute();

        /// <summary>
        /// Выполнить мутацию на основе ДНК
        /// </summary>
        /// <param name="targetDna">Целевая ДНК</param>
        /// <param name="mutationType">Тип мутации</param>
        public abstract void Execute(DnaHelix targetDna, MutationTypes mutationType);
    }
}